package br.com.naybee.framework.client.utils;

import org.jasypt.util.text.BasicTextEncryptor;
import org.springframework.stereotype.Component;

@Component
public class CryptUtil {

	private static final BasicTextEncryptor ENCRYPTOR = new BasicTextEncryptor();
	private static final String KEY_PASSWORD_CRYPT = "#%NAYBEE%#_#%SYSTEM%#_#%EVOLUTION%#";

	public CryptUtil() {
		ENCRYPTOR.setPassword(KEY_PASSWORD_CRYPT);
	}

	public static String decrypt(String decrypt) {
		return ENCRYPTOR.decrypt(decrypt);
	}

	public static String encrypt(String encrypt) {
		return ENCRYPTOR.encrypt(encrypt);
	}
}
